<?php foreach ($shop_cate as $key => $cate) { ?>
<div class="product-box-head">
	<div class="product-box-head-left">
		<h3><?php echo $cate->title; ?></h3>
		<div class="clear"> </div>
	</div>
</div>
<div class="product-grids">
	<?php
	$pCount = 1;
	foreach($aProduct as $product) {
		if($product->shop_cate_id == $cate->id) {
			$this->load->view('shop-themes/'.$shop->template.'/layout/product-item.html.php', array('product' => $product, 'pCount'=>$pCount));
			$pCount = ($pCount==3?1:($pCount+1));
		}
	}
	?>
	<div class="clear"> </div>
</div>
<?php } ?>